<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<!-- Bootstrap 核心 CSS 文件 -->
<link href="${ctxPath}/static/bootstrop/css/bootstrap.min.css" rel="stylesheet">
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="${ctxPath}/static/js/jquery.min.js"></script>
<!-- Bootstrap 核心 JavaScript 文件 -->
<script src="${ctxPath}/static/bootstrop/js/bootstrap.min.js"></script>
<!-- layer 核心 JavaScript 文件 -->
<script src="${ctxPath}/static/layer/layer.js"></script>
<!-- 自定义样式 -->
<link  href="${ctxPath}/static/css/7dub_diy.css" rel="stylesheet">
</head>
<body style="background:#FFFFFF;">
<div class="qaViewBox">
	<form class="form-horizontal" id="eidtForm">
	  <div class="form-group">
	    <label for="inputEmail3" class="col-sm-2 control-label">昵称：</label>
	    <div class="col-sm-3">
	      <input type="text" class="form-control" value="${user.nickname}" id="nickname" name="nickname" placeholder="nickname">
	    </div>
	  </div>
	  <div class="form-group">
	    <label for="inputPassword3" class="col-sm-2 control-label">邮箱：</label>
	    <div class="col-sm-3">
	      <input type="text" class="form-control" value="${user.email}" placeholder="email" disabled>
	    </div>
	  </div>
	  <div class="form-group">
	    <label for="inputPassword3" class="col-sm-2 control-label">年龄：</label>
	    <div class="col-sm-3">
	      <input type="text" class="form-control" value="${user.age}" name="age" placeholder="age">
	    </div>
	  </div>
	  <div class="form-group">
	    <label for="inputPassword3" class="col-sm-2 control-label">性别：</label>
	    <div class="col-sm-3">
	    	<label><input type="radio" name="gender" value="SECRET" <%if(user.gender == "SECRET"){%>checked="checked"<%}%>> 保密　</label>
	      	　<label><input type="radio" name="gender" value="MALE" <%if(user.gender == "MALE"){%>checked="checked"<%}%>> 男　</label>
	      	　<label><input type="radio" name="gender" value="FEMALE" <%if(user.gender == "FEMALE"){%>checked="checked"<%}%>> 女　</label>
	    </div>
	  </div>
	  <div class="form-group">
	    <label for="inputPassword3" class="col-sm-2 control-label">地址：</label>
	    <div class="col-sm-3">
	      <input type="text" class="form-control" value="${user.address}" id="address" name="address" placeholder="address">
	    </div>
	  </div>
	  <div class="form-group">
	    <label for="inputPassword3" class="col-sm-2 control-label">介绍：</label>
	    <div class="col-sm-3">
	      <textarea class="form-control" id="intro" name="intro" placeholder="intro">${user.intro}</textarea>
	    </div>
	  </div>
	  <div class="form-group">
	    <div class="col-sm-offset-2 col-sm-5">
	      　　　　<button type="button" class="btn btn-default" onclick="check();">提交</button>　　　
	      　　　　<button type="reset" class="btn btn-default">重填</button>
	    </div>
	  </div>
	</form>
</div>
<script type="text/javascript">
function check(){
    $.post(
			"${ctxPath}/myself/edit",
			$("#eidtForm").serialize(),
			function(data) {
				if(data) {
				    layer.msg('更新成功！');
				} else{
				    layer.msg('更新出错！');
				}
			},
	    	"json"
		);
}
</script>
</body>
</html>